package org.hardstone.domain.note.resource;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import org.hardstone.domain.BaseItemDomain;
import org.hardstone.domain.BaseCategory;
import org.hardstone.domain.Status;

@Entity
@Table(name = "Note")
public class Note extends BaseItemDomain<Long> {

    @Column(name = "note_content")
    private String noteContent;  // Note content

    @Column(name = "note_tags")
    private String noteTags;  // Note tags

    @Column(name = "note_create_date")
    private String noteCreateDate;  // Creation date

    @Column(name = "note_modify_date")
    private String noteModifyDate;  // Last modification date

    public Note() {
        super();
        this.noteContent = "";
        this.noteTags = "";
        this.noteCreateDate = "";
        this.noteModifyDate = "";
    }
    
    public Note(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String description, Status status, String askDate, String modifyDate, String tags, String attribute) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, description, status, askDate, modifyDate, tags, attribute);   
    }
    public Note(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String description, Status status, String askDate, String modifyDate, String tags, String attribute, String noteContent, String noteTags, String noteCreateDate, String noteModifyDate) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, description, status, askDate, modifyDate, tags, attribute);
        this.noteContent = noteContent;
        this.noteTags = noteTags;
        this.noteCreateDate = noteCreateDate;
        this.noteModifyDate = noteModifyDate;
    }

    public Note(String noteContent, String noteTags, String noteCreateDate, String noteModifyDate) {
        this.noteContent = noteContent;
        this.noteTags = noteTags;
        this.noteCreateDate = noteCreateDate;
        this.noteModifyDate = noteModifyDate;
    }

    // Getter and setter methods
    public String getNoteContent() {
        return noteContent;
    }

    public void setNoteContent(String noteContent) {
        this.noteContent = noteContent;
    }

    public String getNoteTags() {
        return noteTags;
    }

    public void setNoteTags(String noteTags) {
        this.noteTags = noteTags;
    }

    public String getNoteCreateDate() {
        return noteCreateDate;
    }

    public void setNoteCreateDate(String noteCreateDate) {
        this.noteCreateDate = noteCreateDate;
    }

    public String getNoteModifyDate() {
        return noteModifyDate;
    }

    public void setNoteModifyDate(String noteModifyDate) {
        this.noteModifyDate = noteModifyDate;
    }
    @Override
    public String toString() {
        return "Note{" +
                "noteContent='" + noteContent + '\'' +
                ", noteTags='" + noteTags + '\'' +
                ", noteCreateDate='" + noteCreateDate + '\'' +
                ", noteModifyDate='" + noteModifyDate + '\'' +
                ", id=" + id +
                ", itemGroupId=" + itemGroupId +
                ", name='" + name + '\'' +
                ", baseCategory=" + baseCategory +
                ", userId=" + userId +
                ", userGroupId=" + userGroupId +
                ", authority=" + authority +
                ", url='" + url + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", askDate='" + askDate + '\'' +
                ", modifyDate='" + modifyDate + '\'' +
                ", tags='" + tags + '\'' +
                ", attribute='" + attribute + '\'' +
                '}';
    }
}

